-- 基础信息
local base_info = {
	group_id = 199001064
}

-- DEFS_MISCS
local defs = 
{
		guide_region = 64021,
	        lines=
        {
                [64004] = 64022,
                [64009] = 64002,
                [64029] = 64013,
        },
	--玩法完成时 这个gadget如果为GearStop则会被设为Default
        	finish_gadget = 64010,
	--起点格configid
	starter = 64006,
	--终点格configid
	ender = 64026,
	--矩阵 用于踩格子时判断是否相邻
	matrix = 
	{
	
		{       0,       0,64035,64036,64037,       0,       0},

		{       0,       0,64031,       0,64038,64039,       0},

		{64023,64034,64033,       0,       0,64026,       0},

		{64014,64012,       0,       0,       0,       0,       0},

		{       0,64015,       0,       0,       0,       0,       0},
		{       0,       0,       0,       0,       0,       0,       0},

		{64029,       0,       0,64009,       0,       0,64004},

		{       0,       0,       0,       0,       0,64006,64003},

	},	
	--每个还原格控制哪些离散格
	reveal_tiles=
	{
		[64023] = {64001,64007,64008,64011,64016},

	},
	--离散格拼入哪个位置，拼入位置需要布设普通格，初始状态为903
	reveal_match=
	{
		[64001] = 64031,
		[64007] = 64033,
		[64008] = 64034,
		[64011] = 64035,
		[64016] = 64036,

	}
,
       	        --移动格的目标位置
        movable_pos = 
        {--[移动格子configID] = new_pos: 两位数字的矩阵坐标，x是十位，y是个位
		 [64004] = { new_pos = 75 }, 
		 [64009] = { new_pos = 72 }, 
		 [64029] = { new_pos = 51 }, 
        }
	
}

--================================================================
-- 
-- 配置
-- 
--================================================================

-- 怪物
monsters = {
}

-- NPC
npcs = {
}

-- 装置
gadgets = {
	-- 1
	[64001] = { config_id = 64001, gadget_id = 70360353, pos = { x = 316.963, y = 148.062, z = 131.496 }, rot = { x = 39.058, y = 334.016, z = 290.402 }, level = 20, area_id = 402 },
	[64002] = { config_id = 64002, gadget_id = 70310349, pos = { x = 307.001, y = 138.094, z = 142.627 }, rot = { x = 1.758, y = 86.933, z = 179.347 }, level = 20, area_id = 402 },
	[64003] = { config_id = 64003, gadget_id = 70360350, pos = { x = 306.288, y = 141.566, z = 146.054 }, rot = { x = 0.656, y = 0.134, z = 346.475 }, level = 20, area_id = 402 },
	[64004] = { config_id = 64004, gadget_id = 70360351, pos = { x = 306.281, y = 141.601, z = 143.026 }, rot = { x = 0.656, y = 0.134, z = 346.475 }, level = 20, route_id = 900100031, start_route = false, area_id = 402 },
	[64006] = { config_id = 64006, gadget_id = 70360354, pos = { x = 309.231, y = 141.058, z = 145.993 }, rot = { x = 0.656, y = 0.134, z = 352.671 }, level = 20, area_id = 402 },
	-- 3
	[64007] = { config_id = 64007, gadget_id = 70360353, pos = { x = 306.521, y = 150.836, z = 127.697 }, rot = { x = 30.174, y = 113.762, z = 47.453 }, level = 20, area_id = 402 },
	-- 4
	[64008] = { config_id = 64008, gadget_id = 70360353, pos = { x = 322.833, y = 145.300, z = 127.874 }, rot = { x = 17.550, y = 217.961, z = 327.775 }, level = 20, area_id = 402 },
	[64009] = { config_id = 64009, gadget_id = 70360351, pos = { x = 307.363, y = 136.668, z = 135.590 }, rot = { x = 0.656, y = 0.134, z = 358.817 }, level = 20, route_id = 900100032, start_route = false, area_id = 402 },
	[64010] = { config_id = 64010, gadget_id = 70310171, pos = { x = 313.386, y = 140.230, z = 140.466 }, rot = { x = 350.912, y = 356.249, z = 1.581 }, level = 20, state = GadgetState.GearStop, persistent = true, interact_id = 64, area_id = 402 },
	-- 5
	[64011] = { config_id = 64011, gadget_id = 70360353, pos = { x = 314.904, y = 148.475, z = 128.321 }, rot = { x = 358.377, y = 352.740, z = 329.948 }, level = 20, area_id = 402 },
	[64012] = { config_id = 64012, gadget_id = 70360350, pos = { x = 321.926, y = 141.284, z = 141.467 }, rot = { x = 358.819, y = 270.300, z = 351.395 }, level = 20, area_id = 402 },
	[64013] = { config_id = 64013, gadget_id = 70310349, pos = { x = 324.764, y = 136.676, z = 143.563 }, rot = { x = 274.275, y = 258.182, z = 8.794 }, level = 20, area_id = 402 },
	[64014] = { config_id = 64014, gadget_id = 70360350, pos = { x = 324.936, y = 141.222, z = 141.452 }, rot = { x = 358.819, y = 270.300, z = 351.395 }, level = 20, area_id = 402 },
	[64015] = { config_id = 64015, gadget_id = 70360350, pos = { x = 321.936, y = 141.055, z = 144.453 }, rot = { x = 358.819, y = 270.300, z = 359.341 }, level = 20, area_id = 402 },
	-- 6
	[64016] = { config_id = 64016, gadget_id = 70360353, pos = { x = 311.013, y = 148.299, z = 128.327 }, rot = { x = 349.710, y = 140.951, z = 114.737 }, level = 20, area_id = 402 },
	[64022] = { config_id = 64022, gadget_id = 70310349, pos = { x = 306.376, y = 142.904, z = 141.147 }, rot = { x = 56.412, y = 188.887, z = 277.480 }, level = 20, area_id = 402 },
	[64023] = { config_id = 64023, gadget_id = 70360352, pos = { x = 324.934, y = 141.874, z = 138.543 }, rot = { x = 358.819, y = 270.300, z = 342.367 }, level = 20, is_use_point_array = true, area_id = 402 },
	-- 隐藏态
	[64026] = { config_id = 64026, gadget_id = 70360355, pos = { x = 310.287, y = 141.609, z = 139.244 }, rot = { x = 359.945, y = 274.044, z = 346.896 }, level = 20, area_id = 402 },
	[64029] = { config_id = 64029, gadget_id = 70360351, pos = { x = 324.849, y = 136.273, z = 144.392 }, rot = { x = 0.656, y = 0.134, z = 358.817 }, level = 20, route_id = 900100033, start_route = false, area_id = 402 },
	-- 隐藏态1
	[64031] = { config_id = 64031, gadget_id = 70360356, pos = { x = 318.938, y = 142.746, z = 135.693 }, rot = { x = 359.538, y = 272.020, z = 348.636 }, level = 20, state = GadgetState.Action03, area_id = 402 },
	-- 隐藏态3
	[64033] = { config_id = 64033, gadget_id = 70360356, pos = { x = 318.970, y = 141.997, z = 138.574 }, rot = { x = 358.819, y = 270.300, z = 342.367 }, level = 20, state = GadgetState.Action03, area_id = 402 },
	-- 隐藏态4
	[64034] = { config_id = 64034, gadget_id = 70360356, pos = { x = 321.991, y = 141.935, z = 138.558 }, rot = { x = 358.819, y = 270.300, z = 342.367 }, level = 20, state = GadgetState.Action03, area_id = 402 },
	-- 隐藏态5
	[64035] = { config_id = 64035, gadget_id = 70360356, pos = { x = 318.810, y = 143.325, z = 132.816 }, rot = { x = 359.945, y = 274.044, z = 348.627 }, level = 20, state = GadgetState.Action03, area_id = 402 },
	-- 隐藏态6
	[64036] = { config_id = 64036, gadget_id = 70360356, pos = { x = 315.816, y = 143.328, z = 133.028 }, rot = { x = 359.945, y = 274.044, z = 348.627 }, level = 20, state = GadgetState.Action03, area_id = 402 },
	[64037] = { config_id = 64037, gadget_id = 70360350, pos = { x = 312.810, y = 143.325, z = 133.271 }, rot = { x = 359.945, y = 274.044, z = 348.627 }, level = 20, area_id = 402 },
	[64038] = { config_id = 64038, gadget_id = 70360350, pos = { x = 313.032, y = 142.620, z = 136.147 }, rot = { x = 359.945, y = 274.044, z = 341.653 }, level = 20, area_id = 402 },
	[64039] = { config_id = 64039, gadget_id = 70360350, pos = { x = 310.033, y = 142.550, z = 136.330 }, rot = { x = 359.945, y = 274.044, z = 338.303 }, level = 20, area_id = 402 }
}

-- 区域
regions = {
	[64021] = { config_id = 64021, shape = RegionShape.SPHERE, radius = 5, pos = { x = 311.504, y = 140.316, z = 144.124 }, area_id = 402 },
	-- 玩法限定区域
	[64028] = { config_id = 64028, shape = RegionShape.SPHERE, radius = 20, pos = { x = 310.400, y = 142.550, z = 136.559 }, area_id = 402 }
}

-- 触发器
triggers = {
}

-- 变量
variables = {
}

-- 废弃数据
garbages = {
	gadgets = {
		{ config_id = 64005, gadget_id = 70360353, pos = { x = 309.380, y = 150.615, z = 130.494 }, rot = { x = 8.046, y = 278.664, z = 225.970 }, level = 20, area_id = 402 },
		{ config_id = 64017, gadget_id = 70360351, pos = { x = 304.371, y = 136.968, z = 135.602 }, rot = { x = 0.656, y = 0.134, z = 346.475 }, level = 20, area_id = 402 },
		{ config_id = 64018, gadget_id = 70360351, pos = { x = 321.877, y = 136.266, z = 144.399 }, rot = { x = 0.656, y = 0.134, z = 358.817 }, level = 20, area_id = 402 },
		{ config_id = 64019, gadget_id = 70360353, pos = { x = 318.683, y = 145.791, z = 129.647 }, rot = { x = 17.143, y = 0.721, z = 27.609 }, level = 20, area_id = 402 },
		{ config_id = 64020, gadget_id = 70360356, pos = { x = 318.280, y = 141.172, z = 144.921 }, rot = { x = 0.656, y = 264.501, z = 358.817 }, level = 20, state = GadgetState.Action03, area_id = 402 },
		{ config_id = 64030, gadget_id = 70360351, pos = { x = 324.947, y = 141.015, z = 144.446 }, rot = { x = 0.656, y = 0.134, z = 358.817 }, level = 20, area_id = 402 },
		{ config_id = 64032, gadget_id = 70360356, pos = { x = 318.823, y = 141.123, z = 142.569 }, rot = { x = 0.656, y = 264.501, z = 358.817 }, level = 20, state = GadgetState.Action03, area_id = 402 }
	}
}

--================================================================
-- 
-- 初始化配置
-- 
--================================================================

-- 初始化时创建
init_config = {
	suite = 1,
	end_suite = 0,
	rand_suite = false
}

--================================================================
-- 
-- 小组配置
-- 
--================================================================

suites = {
	{
		-- suite_id = 1,
		-- description = ,
		monsters = { },
		gadgets = { 64010 },
		regions = { 64021 },
		triggers = { },
		rand_weight = 100
	},
	{
		-- suite_id = 2,
		-- description = ,
		monsters = { },
		gadgets = { 64001, 64002, 64003, 64004, 64006, 64007, 64008, 64009, 64011, 64012, 64013, 64014, 64015, 64016, 64022, 64023, 64026, 64029, 64031, 64033, 64034, 64035, 64036, 64037, 64038, 64039 },
		regions = { 64028 },
		triggers = { },
		rand_weight = 100
	}
}

--================================================================
-- 
-- 触发器
-- 
--================================================================

require "V2_8/DrawOneLine_Dreamland"